package org.test.web.controller;

import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;
import org.springframework.web.bind.annotation.RestController;
import org.test.web.entity.UserLoginResponse;

import java.time.LocalDateTime;

/**
 * 功能描述
 *破解墨镜请求登录
 * @author: weiken
 * @date: 2023年10月25日 10:47
 */
@RestController
@RequestMapping("/appUser")
public class AppUserController {
    @ResponseBody
    @RequestMapping("appUserLogin.do")
    public UserLoginResponse appUserLogin(){


        UserLoginResponse userLoginResponse = new UserLoginResponse();
        UserLoginResponse.UserLoginResponseData userLoginResponseData = new UserLoginResponse.UserLoginResponseData();
        userLoginResponseData.setUserId("100023");
        //userLoginResponseData.setHeadPic("img.jpg");
        userLoginResponseData.setUserName("100023");
        userLoginResponseData.setIfPwd("pwd");
        userLoginResponseData.setMobile("18606009183");
        LocalDateTime now = LocalDateTime.now();

        userLoginResponseData.setToken("fdjsklfdsj234324jlfsd"+now.toString());
        userLoginResponseData.setNickName("赤兔");


        userLoginResponse.setCode("200");
        userLoginResponse.setMessage("登录成功");
        userLoginResponse.setData(userLoginResponseData);

        return userLoginResponse;
    }
}
